cmake_minimum_required(VERSION 2.8)
project (mbtilesSrv)
set (CMAKE_CXX_STANDARD 11)
if (WIN32)
  find_package(Boost REQUIRED COMPONENTS system date_time regex)
else()
  find_package(Boost REQUIRED COMPONENTS system)
endif()
if(NOT Boost_FOUND)
  message("Not found Boost")
endif()
message(Boost_INCLUDE_DIRS " ${Boost_INCLUDE_DIRS}")
message(Boost_LIBRARY_DIRS " ${Boost_LIBRARY_DIRS}")
message(Boost_LIBRARIES " ${Boost_LIBRARIES}")
include_directories(${Boost_INCLUDE_DIRS})
add_executable(mbtilesSrv main.cpp sqlite3.c CppSQLite3U.cpp)
target_link_libraries(mbtilesSrv ${Boost_LIBRARIES})
if (UNIX)
  target_link_libraries(mbtilesSrv pthread dl)
endif()
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib)
